Improve error handling: log previously silenced failures in recovery and stream paths#2
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
Conversation
…and stream paths - relay_switch.rs: Log rollback save failure and settings load fallback - relay_config.rs: Log failed file restoration during config write rollback - launcher.rs: Log stream chunk errors, helper connection failures, and failure status persistence errors - watcher.rs: Log spawn_launcher failures - provider_sync.rs: Log restore_session_changes failure during rollback All error recovery and rollback operations now emit diagnostic log entries when they fail, making silent failures observable without changing the control flow or error propagation semantics. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Error recovery/rollback operations and background stream handlers were silently discarding failures via bare
let _ =or missing error branches. When these paths fail, the system loses its ability to restore consistent state—and there's no observable signal that something went wrong.This PR adds diagnostic log entries (
append_diagnostic_log) to all critical silent-failure sites without changing control flow or error propagation semantics. The pattern used:Key changes:
relay_switch.rs— Log whenstore.save()fails during rollback after a failedapply_selected_relay_profile, and when settings load falls back to defaultsrelay_config.rs— Log failedrestore_optional_filecalls for both auth and config paths during write-error rollbacklauncher.rs— Log stream chunk read errors (previouslybreakwith no trace), helper connection errors (fire-and-forget task), and failure-status persistence errorswatcher.rs— Logcommand.spawn()failure when relaunching on Windowsprovider_sync.rs— Logrestore_session_changesfailure during apply-error rollbackLink to Devin session: https://app.devin.ai/sessions/00a57b2e950a4c45b346a605e295aad6
Requested by: @ManhND226677